<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>module Bundler::Thor::Base::ClassMethods - bundler: Ruby Standard Library Documentation</title>


<script src="../../../js/navigation.js" defer></script>
<script src="../../../js/search.js" defer></script>
<script src="../../../js/search_index.js" defer></script>
<script src="../../../js/searcher.js" defer></script>
<script src="../../../js/darkfish.js" defer></script>

<script src="../../../js/jquery-3.2.0.min.js"></script>

<script src="../../../js/vue.min.js"></script>
<script src="../../../js/js.cookie.min.js"></script>

<link href="../../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../../css/rdoc.css" rel="stylesheet">
<link href="../../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../../";
  var index_rel_prefix = "../../../";
  var darkModeCsseHref = "../../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="module">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../../table_of_contents.html#pages">Pages</a>
    <a href="../../../table_of_contents.html#classes">Classes</a>
    <a href="../../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-i-all_commands">#all_commands</a>
    <li ><a href="#method-i-all_tasks">#all_tasks</a>
    <li ><a href="#method-i-allow_incompatible_default_type-21">#allow_incompatible_default_type!</a>
    <li ><a href="#method-i-argument">#argument</a>
    <li ><a href="#method-i-arguments">#arguments</a>
    <li ><a href="#method-i-basename">#basename</a>
    <li ><a href="#method-i-check_default_type-21">#check_default_type!</a>
    <li ><a href="#method-i-check_unknown_options-21">#check_unknown_options!</a>
    <li ><a href="#method-i-class_option">#class_option</a>
    <li ><a href="#method-i-class_options">#class_options</a>
    <li ><a href="#method-i-commands">#commands</a>
    <li ><a href="#method-i-exit_on_failure-3F">#exit_on_failure?</a>
    <li ><a href="#method-i-from_superclass">#from_superclass</a>
    <li ><a href="#method-i-group">#group</a>
    <li class="calls-super" ><a href="#method-i-inherited">#inherited</a>
    <li class="calls-super" ><a href="#method-i-method_added">#method_added</a>
    <li ><a href="#method-i-namespace">#namespace</a>
    <li ><a href="#method-i-no_commands">#no_commands</a>
    <li ><a href="#method-i-no_commands-3F">#no_commands?</a>
    <li ><a href="#method-i-no_commands_context">#no_commands_context</a>
    <li ><a href="#method-i-no_tasks">#no_tasks</a>
    <li ><a href="#method-i-print_options">#print_options</a>
    <li ><a href="#method-i-public_command">#public_command</a>
    <li ><a href="#method-i-public_task">#public_task</a>
    <li ><a href="#method-i-remove_argument">#remove_argument</a>
    <li ><a href="#method-i-remove_class_option">#remove_class_option</a>
    <li ><a href="#method-i-remove_command">#remove_command</a>
    <li ><a href="#method-i-remove_task">#remove_task</a>
    <li ><a href="#method-i-start">#start</a>
    <li ><a href="#method-i-strict_args_position-21">#strict_args_position!</a>
    <li ><a href="#method-i-tasks">#tasks</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="module-Bundler::Thor::Base::ClassMethods">
    <h1 id="module-Bundler::Thor::Base::ClassMethods" class="module">
      module Bundler::Thor::Base::ClassMethods
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-all_commands" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">all_commands</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the commands for this Bundler::Thor class and all subclasses.</p>

<h4 id="method-i-all_commands-label-Returns">Returns<span><a href="#method-i-all_commands-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>Hash
<dd>
<p>An ordered hash with commands names as keys and <a href="../Command.html"><code>Bundler::Thor::Command</code></a> objects as values.</p>
</dd></dl>

                              <div class="method-source-code" id="all_commands-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 383</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">all_commands</span>
  <span class="ruby-ivar">@all_commands</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">from_superclass</span>(<span class="ruby-value">:all_commands</span>, <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
  <span class="ruby-ivar">@all_commands</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">commands</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="ClassMethods.html#method-i-all_tasks">all_tasks</a>
                            </div>

                          </div>

                  <div id="method-i-all_tasks" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">all_tasks</span><span
                                class="method-args">()</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="ClassMethods.html#method-i-all_commands">all_commands</a>
                            </div>
                          </div>

                  <div id="method-i-allow_incompatible_default_type-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">allow_incompatible_default_type!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>If you want to use defaults that don’t match the type of an option, either specify ‘check_default_type: false` or call `allow_incompatible_default_type!`</p>

                              <div class="method-source-code" id="allow_incompatible_default_type-21-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 173</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">allow_incompatible_default_type!</span>
  <span class="ruby-ivar">@check_default_type</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-argument" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">argument</span><span
                                class="method-args">(name, options = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds an argument to the class and creates an attr_accessor for it.</p>

<p>Arguments are different from options in several aspects. The first one is how they are parsed from the command line, arguments are retrieved from position:</p>

<pre class="ruby"><span class="ruby-identifier">thor</span> <span class="ruby-identifier">command</span> <span class="ruby-constant">NAME</span>
</pre>

<p>Instead of:</p>

<pre class="ruby"><span class="ruby-identifier">thor</span> <span class="ruby-identifier">command</span> <span class="ruby-operator">-</span><span class="ruby-operator">-</span><span class="ruby-identifier">name</span>=<span class="ruby-constant">NAME</span>
</pre>

<p>Besides, arguments are used inside your code as an accessor (self.argument), while options are all kept in a hash (self.options).</p>

<p>Finally, arguments cannot have type :default or :boolean but can be optional (supplying :optional =&gt; :true or :required =&gt; false), although you cannot have a required argument after a non-required argument. If you try it, an error is raised.</p>

<h4 id="method-i-argument-label-Parameters">Parameters<span><a href="#method-i-argument-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>name&lt;Symbol&gt;
<dd>
<p>The name of the argument.</p>
</dd><dt>options&lt;Hash&gt;
<dd>
<p>Described below.</p>
</dd></dl>

<h4 id="method-i-argument-label-Options">Options<span><a href="#method-i-argument-label-Options">&para;</a> <a href="#top">&uarr;</a></span></h4>

<p>:desc     - Description for the argument. :required - If the argument is required or not. :optional - If the argument is optional or not. :type     - The type of the argument, can be :string, :hash, :array, :numeric. :default  - Default value for this argument. It cannot be required and have default values. :banner   - String to show on usage notes.</p>

<h4 id="method-i-argument-label-Errors">Errors<span><a href="#method-i-argument-label-Errors">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>ArgumentError
<dd>
<p>Raised if you supply a required argument after a non required one.</p>
</dd></dl>

                              <div class="method-source-code" id="argument-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 245</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">argument</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {})
  <span class="ruby-identifier">is_thor_reserved_word?</span>(<span class="ruby-identifier">name</span>, <span class="ruby-value">:argument</span>)
  <span class="ruby-identifier">no_commands</span> { <span class="ruby-identifier">attr_accessor</span> <span class="ruby-identifier">name</span> }

  <span class="ruby-identifier">required</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:optional</span>)
    <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:optional</span>]
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:required</span>)
    <span class="ruby-identifier">options</span>[<span class="ruby-value">:required</span>]
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">options</span>[<span class="ruby-value">:default</span>].<span class="ruby-identifier">nil?</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">remove_argument</span> <span class="ruby-identifier">name</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">required</span>
    <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">argument</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">argument</span>.<span class="ruby-identifier">required?</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;You cannot have #{name.to_s.inspect} as required argument after &quot;</span> \
                          <span class="ruby-node">&quot;the non-required argument #{argument.human_name.inspect}.&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">options</span>[<span class="ruby-value">:required</span>] = <span class="ruby-identifier">required</span>

  <span class="ruby-identifier">arguments</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Argument</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-arguments" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">arguments</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns this class arguments, looking up in the ancestors chain.</p>

<h4 id="method-i-arguments-label-Returns">Returns<span><a href="#method-i-arguments-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h4>

<p><a href="Bundler::Thor::Argument">Array</a></p>

                              <div class="method-source-code" id="arguments-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 277</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">arguments</span>
  <span class="ruby-ivar">@arguments</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">from_superclass</span>(<span class="ruby-value">:arguments</span>, [])
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-check_default_type-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_default_type!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>If you want to raise an error when the default value of an option does not match the type call check_default_type! This will be the default; for compatibility a deprecation warning is issued if necessary.</p>

                              <div class="method-source-code" id="check_default_type-21-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 167</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_default_type!</span>
  <span class="ruby-ivar">@check_default_type</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-check_unknown_options-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_unknown_options!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>If you want to raise an error for unknown options, call check_unknown_options! This is disabled by default to allow dynamic invocations.</p>

                              <div class="method-source-code" id="check_unknown_options-21-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 152</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_unknown_options!</span>
  <span class="ruby-ivar">@check_unknown_options</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-class_option" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">class_option</span><span
                                class="method-args">(name, options = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds an option to the set of class options</p>

<h4 id="method-i-class_option-label-Parameters">Parameters<span><a href="#method-i-class_option-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>name&lt;Symbol&gt;
<dd>
<p>The name of the argument.</p>
</dd><dt>options&lt;Hash&gt;
<dd>
<p>Described below.</p>
</dd></dl>

<h4 id="method-i-class_option-label-Options">Options<span><a href="#method-i-class_option-label-Options">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>:desc
<dd>
<p>– Description for the argument.</p>
</dd><dt>:required
<dd>
<p>– If the argument is required or not.</p>
</dd><dt>:default
<dd>
<p>– Default value for this argument.</p>
</dd><dt>:group
<dd>
<p>– The group for this options. Use by class options to output options in different levels.</p>
</dd><dt>:aliases
<dd>
<p>– Aliases for this option. <strong>Note:</strong> Bundler::Thor follows a convention of one-dash-one-letter options. Thus aliases like “-something” wouldn’t be parsed; use either “--something” or “-s” instead.</p>
</dd><dt>:type
<dd>
<p>– The type of the argument, can be :string, :hash, :array, :numeric or :boolean.</p>
</dd><dt>:banner
<dd>
<p>– String to show on usage notes.</p>
</dd><dt>:hide
<dd>
<p>– If you want to hide this option from the help.</p>
</dd></dl>

                              <div class="method-source-code" id="class_option-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 312</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">class_option</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {})
  <span class="ruby-identifier">build_option</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">class_options</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-class_options" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">class_options</span><span
                                class="method-args">(options = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Adds a bunch of options to the set of class options.</p>

<pre class="ruby"><span class="ruby-identifier">class_options</span> <span class="ruby-value">:foo</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">false</span>, <span class="ruby-value">:bar</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-value">:required</span>, <span class="ruby-value">:baz</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-value">:string</span>
</pre>

<p>If you prefer more detailed declaration, check class_option.</p>

<h4 id="method-i-class_options-label-Parameters">Parameters<span><a href="#method-i-class_options-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>

<p>Hash[Symbol =&gt; Object]</p>

                              <div class="method-source-code" id="class_options-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 290</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">class_options</span>(<span class="ruby-identifier">options</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-ivar">@class_options</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">from_superclass</span>(<span class="ruby-value">:class_options</span>, {})
  <span class="ruby-identifier">build_options</span>(<span class="ruby-identifier">options</span>, <span class="ruby-ivar">@class_options</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>
  <span class="ruby-ivar">@class_options</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-commands" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">commands</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Returns the commands for this Bundler::Thor class.</p>

<h4 id="method-i-commands-label-Returns">Returns<span><a href="#method-i-commands-label-Returns">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>Hash
<dd>
<p>An ordered hash with commands names as keys and <a href="../Command.html"><code>Bundler::Thor::Command</code></a> objects as values.</p>
</dd></dl>

                              <div class="method-source-code" id="commands-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 372</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">commands</span>
  <span class="ruby-ivar">@commands</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="ClassMethods.html#method-i-tasks">tasks</a>
                            </div>

                          </div>

                  <div id="method-i-exit_on_failure-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">exit_on_failure?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>A flag that makes the process exit with status 1 if any error happens.</p>

                              <div class="method-source-code" id="exit_on_failure-3F-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 529</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">exit_on_failure?</span>
  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span>.<span class="ruby-identifier">deprecation_warning</span> <span class="ruby-node">&quot;Bundler::Thor exit with status 0 on errors. To keep this behavior, you must define `exit_on_failure?` in `#{self.name}`&quot;</span>
  <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-group" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">group</span><span
                                class="method-args">(name = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Defines the group. This is used when thor list is invoked so you can specify that only commands from a pre-defined group will be shown. Defaults to standard.</p>

<h4 id="method-i-group-label-Parameters">Parameters<span><a href="#method-i-group-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>

<p>name&lt;String|Symbol&gt;</p>

                              <div class="method-source-code" id="group-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 358</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">group</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>
    <span class="ruby-ivar">@group</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-ivar">@group</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">from_superclass</span>(<span class="ruby-value">:group</span>, <span class="ruby-string">&quot;standard&quot;</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-namespace" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">namespace</span><span
                                class="method-args">(name = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Sets the namespace for the Bundler::Thor or <a href="../Group.html"><code>Bundler::Thor::Group</code></a> class. By default the namespace is retrieved from the class name. If your Bundler::Thor class is named Scripts::MyScript, the help method, for example, will be called as:</p>

<pre>thor scripts:my_script -h</pre>

<p>If you change the namespace:</p>

<pre class="ruby"><span class="ruby-identifier">namespace</span> <span class="ruby-value">:my_scripts</span>
</pre>

<p>You change how your commands are invoked:</p>

<pre class="ruby"><span class="ruby-identifier">thor</span> <span class="ruby-identifier">my_scripts</span> <span class="ruby-operator">-</span><span class="ruby-identifier">h</span>
</pre>

<p>Finally, if you change your namespace to default:</p>

<pre class="ruby"><span class="ruby-identifier">namespace</span> <span class="ruby-value">:default</span>
</pre>

<p>Your commands can be invoked with a shortcut. Instead of:</p>

<pre class="ruby"><span class="ruby-identifier">thor</span> <span class="ruby-value">:my_command</span>
</pre>

                              <div class="method-source-code" id="namespace-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 467</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">namespace</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>
    <span class="ruby-ivar">@namespace</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-ivar">@namespace</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">namespace_from_thor_class</span>(<span class="ruby-keyword">self</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-no_commands" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">no_commands</span><span
                                class="method-args">(&amp;block)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>All methods defined inside the given block are not added as commands.</p>

<p>So you can do:</p>

<pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">MyScript</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span>
  <span class="ruby-identifier">no_commands</span> <span class="ruby-keyword">do</span>
    <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">this_is_not_a_command</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
</pre>

<p>You can also add the method and remove it from the command list:</p>

<pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">MyScript</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span>
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">this_is_not_a_command</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">remove_command</span> <span class="ruby-value">:this_is_not_a_command</span>
<span class="ruby-keyword">end</span>
</pre>

                              <div class="method-source-code" id="no_commands-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 431</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">no_commands</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">no_commands_context</span>.<span class="ruby-identifier">enter</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="ClassMethods.html#method-i-no_tasks">no_tasks</a>
                            </div>

                          </div>

                  <div id="method-i-no_commands-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">no_commands?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="no_commands-3F-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 441</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">no_commands?</span>
  <span class="ruby-identifier">no_commands_context</span>.<span class="ruby-identifier">entered?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-no_commands_context" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">no_commands_context</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="no_commands_context-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 437</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">no_commands_context</span>
  <span class="ruby-ivar">@no_commands_context</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">NestedContext</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-no_tasks" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">no_tasks</span><span
                                class="method-args">(&amp;block)</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="ClassMethods.html#method-i-no_commands">no_commands</a>
                            </div>
                          </div>

                  <div id="method-i-public_command" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">public_command</span><span
                                class="method-args">(*names)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Allows to use private methods from parent in child classes as commands.</p>

<h4 id="method-i-public_command-label-Parameters">Parameters<span><a href="#method-i-public_command-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>

<pre>names&lt;Array&gt;:: Method names to be used as commands</pre>

<h4 id="method-i-public_command-label-Examples">Examples<span><a href="#method-i-public_command-label-Examples">&para;</a> <a href="#top">&uarr;</a></span></h4>

<pre class="ruby"><span class="ruby-identifier">public_command</span> <span class="ruby-value">:foo</span>
<span class="ruby-identifier">public_command</span> <span class="ruby-value">:foo</span>, <span class="ruby-value">:bar</span>, <span class="ruby-value">:baz</span>
</pre>

                              <div class="method-source-code" id="public_command-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 507</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">public_command</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)
  <span class="ruby-identifier">names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">class_eval</span> <span class="ruby-node">&quot;def #{name}(*); super end&quot;</span>, <span class="ruby-keyword">__FILE__</span>, <span class="ruby-keyword">__LINE__</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="ClassMethods.html#method-i-public_task">public_task</a>
                            </div>

                          </div>

                  <div id="method-i-public_task" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">public_task</span><span
                                class="method-args">(*names)</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="ClassMethods.html#method-i-public_command">public_command</a>
                            </div>
                          </div>

                  <div id="method-i-remove_argument" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remove_argument</span><span
                                class="method-args">(*names)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Removes a previous defined argument. If :undefine is given, undefine accessors as well.</p>

<h4 id="method-i-remove_argument-label-Parameters">Parameters<span><a href="#method-i-remove_argument-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>names&lt;Array&gt;
<dd>
<p>Arguments to be removed</p>
</dd></dl>

<h4 id="method-i-remove_argument-label-Examples">Examples<span><a href="#method-i-remove_argument-label-Examples">&para;</a> <a href="#top">&uarr;</a></span></h4>

<pre class="ruby"><span class="ruby-identifier">remove_argument</span> <span class="ruby-value">:foo</span>
<span class="ruby-identifier">remove_argument</span> <span class="ruby-value">:foo</span>, <span class="ruby-value">:bar</span>, <span class="ruby-value">:baz</span>, <span class="ruby-value">:undefine</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>
</pre>

                              <div class="method-source-code" id="remove_argument-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 327</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remove_argument</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)
  <span class="ruby-identifier">options</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">names</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}

  <span class="ruby-identifier">names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">arguments</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span> }
    <span class="ruby-identifier">undef_method</span> <span class="ruby-identifier">name</span>, <span class="ruby-node">&quot;#{name}=&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:undefine</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remove_class_option" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remove_class_option</span><span
                                class="method-args">(*names)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Removes a previous defined class option.</p>

<h4 id="method-i-remove_class_option-label-Parameters">Parameters<span><a href="#method-i-remove_class_option-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>names&lt;Array&gt;
<dd>
<p>Class options to be removed</p>
</dd></dl>

<h4 id="method-i-remove_class_option-label-Examples">Examples<span><a href="#method-i-remove_class_option-label-Examples">&para;</a> <a href="#top">&uarr;</a></span></h4>

<pre class="ruby"><span class="ruby-identifier">remove_class_option</span> <span class="ruby-value">:foo</span>
<span class="ruby-identifier">remove_class_option</span> <span class="ruby-value">:foo</span>, <span class="ruby-value">:bar</span>, <span class="ruby-value">:baz</span>
</pre>

                              <div class="method-source-code" id="remove_class_option-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 346</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remove_class_option</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)
  <span class="ruby-identifier">names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">class_options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-remove_command" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">remove_command</span><span
                                class="method-args">(*names)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Removes a given command from this Bundler::Thor class. This is usually done if you are inheriting from another class and don’t want it to be available anymore.</p>

<p>By default it only remove the mapping to the command. But you can supply :undefine =&gt; true to undefine the method from the class as well.</p>

<h4 id="method-i-remove_command-label-Parameters">Parameters<span><a href="#method-i-remove_command-label-Parameters">&para;</a> <a href="#top">&uarr;</a></span></h4>
<dl class="rdoc-list note-list"><dt>name&lt;Symbol|String&gt;
<dd>
<p>The name of the command to be removed</p>
</dd><dt>options&lt;Hash&gt;
<dd>
<p>You can give :undefine =&gt; true if you want commands the method to be undefined from the class as well.</p>
</dd></dl>

                              <div class="method-source-code" id="remove_command-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 401</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">remove_command</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">names</span>)
  <span class="ruby-identifier">options</span> = <span class="ruby-identifier">names</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">names</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}

  <span class="ruby-identifier">names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">commands</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
    <span class="ruby-identifier">all_commands</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
    <span class="ruby-identifier">undef_method</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:undefine</span>]
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>

                            <div class="aliases">
                              Also aliased as: <a href="ClassMethods.html#method-i-remove_task">remove_task</a>
                            </div>

                          </div>

                  <div id="method-i-remove_task" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">remove_task</span><span
                                class="method-args">(*names)</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="ClassMethods.html#method-i-remove_command">remove_command</a>
                            </div>
                          </div>

                  <div id="method-i-start" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">start</span><span
                                class="method-args">(given_args = ARGV, config = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Parses the command and options from the given args, instantiate the class and invoke the command. This method is used when the arguments must be parsed from an array. If you are inside Ruby and want to use a Bundler::Thor class, you can simply initialize it:</p>

<pre class="ruby"><span class="ruby-identifier">script</span> = <span class="ruby-constant">MyScript</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">args</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">config</span>)
<span class="ruby-identifier">script</span>.<span class="ruby-identifier">invoke</span>(<span class="ruby-value">:command</span>, <span class="ruby-identifier">first_arg</span>, <span class="ruby-identifier">second_arg</span>, <span class="ruby-identifier">third_arg</span>)
</pre>

                              <div class="method-source-code" id="start-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 483</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">start</span>(<span class="ruby-identifier">given_args</span> = <span class="ruby-constant">ARGV</span>, <span class="ruby-identifier">config</span> = {})
  <span class="ruby-identifier">config</span>[<span class="ruby-value">:shell</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">shell</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">dispatch</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">given_args</span>.<span class="ruby-identifier">dup</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">config</span>)
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
  <span class="ruby-identifier">config</span>[<span class="ruby-value">:debug</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">&quot;THOR_DEBUG&quot;</span>] <span class="ruby-operator">==</span> <span class="ruby-string">&quot;1&quot;</span> <span class="ruby-operator">?</span> (<span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">config</span>[<span class="ruby-value">:shell</span>].<span class="ruby-identifier">error</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>)
  <span class="ruby-identifier">exit</span>(<span class="ruby-keyword">false</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">exit_on_failure?</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPIPE</span>
  <span class="ruby-comment"># This happens if a thor command is piped to something like `head`,</span>
  <span class="ruby-comment"># which closes the pipe when it&#39;s done reading. This will also</span>
  <span class="ruby-comment"># mean that if the pipe is closed, further unnecessary</span>
  <span class="ruby-comment"># computation will not occur.</span>
  <span class="ruby-identifier">exit</span>(<span class="ruby-keyword">true</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-strict_args_position-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">strict_args_position!</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>If you want only strict string args (useful when cascading thor classes), call strict_args_position! This is disabled by default to allow dynamic invocations.</p>

                              <div class="method-source-code" id="strict_args_position-21-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 198</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">strict_args_position!</span>
  <span class="ruby-ivar">@strict_args_position</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-tasks" class="method-detail method-alias">
                            <div class="method-heading">
                              <span class="method-name">tasks</span><span
                                class="method-args">()</span>
                            </div>

                            <div class="method-description">
                              

                            </div>


                            <div class="aliases">
                              Alias for: <a href="ClassMethods.html#method-i-commands">commands</a>
                            </div>
                          </div>

                          </section>

                <section id="protected-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Protected Instance Methods</h3>
                </header>

                  <div id="method-i-basename" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">basename</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>The basename of the program invoking the thor class.</p>

                              <div class="method-source-code" id="basename-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 672</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">basename</span>
  <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">$PROGRAM_NAME</span>).<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot; &quot;</span>).<span class="ruby-identifier">first</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-from_superclass" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">from_superclass</span><span
                                class="method-args">(method, default = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Retrieves a value from superclass. If it reaches the baseclass, returns default.</p>

                              <div class="method-source-code" id="from_superclass-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 650</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">from_superclass</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">baseclass</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method</span>, <span class="ruby-keyword">true</span>)
    <span class="ruby-identifier">default</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">superclass</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>)

    <span class="ruby-comment"># Ruby implements `dup` on Object, but raises a `TypeError`</span>
    <span class="ruby-comment"># if the method is called on immediates. As a result, we</span>
    <span class="ruby-comment"># don&#39;t have a good way to check whether dup will succeed</span>
    <span class="ruby-comment"># without calling it and rescuing the TypeError.</span>
    <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">value</span>.<span class="ruby-identifier">dup</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">TypeError</span>
      <span class="ruby-identifier">value</span>
    <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-inherited" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">inherited</span><span
                                class="method-args">(klass)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Every time someone inherits from a Bundler::Thor class, register the klass and file into baseclass.</p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  
                              </div>

                              <div class="method-source-code" id="inherited-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 622</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">inherited</span>(<span class="ruby-identifier">klass</span>)
  <span class="ruby-keyword">super</span>(<span class="ruby-identifier">klass</span>)
  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">register_klass_file</span>(<span class="ruby-identifier">klass</span>)
  <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-value">:@no_commands</span>, <span class="ruby-value">0</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-method_added" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">method_added</span><span
                                class="method-args">(meth)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Fire this callback whenever a method is added. Added methods are tracked as commands by invoking the create_command method.</p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  
                              </div>

                              <div class="method-source-code" id="method_added-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 630</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">method_added</span>(<span class="ruby-identifier">meth</span>)
  <span class="ruby-keyword">super</span>(<span class="ruby-identifier">meth</span>)
  <span class="ruby-identifier">meth</span> = <span class="ruby-identifier">meth</span>.<span class="ruby-identifier">to_s</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">meth</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;initialize&quot;</span>
    <span class="ruby-identifier">initialize_added</span>
    <span class="ruby-keyword">return</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment"># Return if it&#39;s not a public instance method</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">public_method_defined?</span>(<span class="ruby-identifier">meth</span>.<span class="ruby-identifier">to_sym</span>)

  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">no_commands?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">create_command</span>(<span class="ruby-identifier">meth</span>)

  <span class="ruby-identifier">is_thor_reserved_word?</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-value">:command</span>)
  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">register_klass_file</span>(<span class="ruby-keyword">self</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-print_options" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">print_options</span><span
                                class="method-args">(shell, options, group_name = nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Receives a set of options and print them.</p>

                              <div class="method-source-code" id="print_options-source">
            <pre><span class="ruby-comment"># File bundler/vendor/thor/lib/thor/base.rb, line 557</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_options</span>(<span class="ruby-identifier">shell</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">group_name</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">empty?</span>

  <span class="ruby-identifier">list</span> = []
  <span class="ruby-identifier">padding</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">aliases_for_usage</span>.<span class="ruby-identifier">size</span> }.<span class="ruby-identifier">max</span>.<span class="ruby-identifier">to_i</span>
  <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">option</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">option</span>.<span class="ruby-identifier">hide</span>
    <span class="ruby-identifier">item</span> = [<span class="ruby-identifier">option</span>.<span class="ruby-identifier">usage</span>(<span class="ruby-identifier">padding</span>)]
    <span class="ruby-identifier">item</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">option</span>.<span class="ruby-identifier">description</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;# #{option.description}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-string">&quot;&quot;</span>)

    <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">item</span>
    <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;&quot;</span>, <span class="ruby-node">&quot;# Default: #{option.default}&quot;</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">option</span>.<span class="ruby-identifier">show_default?</span>
    <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;&quot;</span>, <span class="ruby-node">&quot;# Possible values: #{option.enum.join(&#39;, &#39;)}&quot;</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">option</span>.<span class="ruby-identifier">enum</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">shell</span>.<span class="ruby-identifier">say</span>(<span class="ruby-identifier">group_name</span> <span class="ruby-operator">?</span> <span class="ruby-node">&quot;#{group_name} options:&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-string">&quot;Options:&quot;</span>)
  <span class="ruby-identifier">shell</span>.<span class="ruby-identifier">print_table</span>(<span class="ruby-identifier">list</span>, <span class="ruby-value">:indent</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-value">2</span>)
  <span class="ruby-identifier">shell</span>.<span class="ruby-identifier">say</span> <span class="ruby-string">&quot;&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

